<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="${pageContext.request.contextPath }/common/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath }/common/css/bootstrap-theme.min.css" >
<script src="${pageContext.request.contextPath }/common/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath }/common/js/jquery-2.1.1.min.js"></script>

<title>My Information</title>
</head>

<script type="text/javascript">
	$(function(){
		$("#modify").on("click", function(){
			var result = confirm("Do you want build a snowman?");
			if(result == true){
				$("form").submit();
			}else{
				return;
			}
		});
		
	});
		function withdraw(num) {
			var result2 = confirm("本当に辞めちゃうんですか？");
			var no = num;
			if(result2 == true) {
				location.href = "/Test06/userWithDraw.do?no="+no+"";
			}
		}

</script>
<body>

<div class="container">
	<div class="row col-md-3">
    <form class="form-horizontal" role="form" action="userUpdate.do" method="post" >
        <h3 class="form-signin-heading">Modify My Info</h3>
      <div class="form-group">
        <input type="hidden" class="form-control" name="no" value="${currentUser.no }">
        <label for="modifyName" class="col-sm-2 control-label">Name</label>
          <div class="col-sm-10">
        	<input type="text" class="form-control" name="name" value="${currentUser.name }">
          </div>
      </div>
      <div class="form-group">
        <label for="modifyPass" class="col-sm-2 control-label">Pass</label>
          <div class="col-sm-10">	
        	<input type="text" class="form-control" name="password" value="${currentUser.password }">
      	</div>
      </div>
      <div class="form-group">
        <label for="modifyPass" class="col-sm-2 control-label">Addr</label>
          <div class="col-sm-10">	
          	<input type="text" class="form-control" name="address" value="${currentUser.address }">
          </div>
      </div>
      <div class="form-group">
        <label for="modifyPass" class="col-sm-2 control-label">Birth</label>
          <div class="col-sm-10">	
          	<input type="text" class="form-control" name="birth" value="${currentUser.birth }">
          </div>
      </div>
      <div class="form-group">
        <label for="modifyPass" class="col-sm-2 control-label">Email</label>
          <div class="col-sm-10">	
          	<input type="text" class="form-control" name="email" value="${currentUser.email }">
          </div>
      </div>
        <input class="btn btn-warning btn-primary" type="button" id="modify" value="Modify">
	</form><!---------- form  ------------>
      <div>
        <input class="btn btn-warning btn-danger" type="button" onclick="withdraw(${currentUser.no})" value="WithDraw"></a>
      </div>
   
    </div>
</body>
</html>